package org.lzfto.flink.demo.business.flinkTest.flinkObjects.source;

import java.io.IOException;

import org.apache.flink.core.io.SimpleVersionedSerializer;

import com.alibaba.fastjson2.JSON;

/**
*
*@author lzfto
*@创建时间 2025年6月13日 17:55:19
*/
public class JsonSimpleVersionedSerializer implements SimpleVersionedSerializer<CustEnumeratorCKT> {

	@Override
	public int getVersion() {
		return 2045;
	}

	@Override
	public byte[] serialize(CustEnumeratorCKT obj) throws IOException {
		return JSON.toJSONBytes(obj);
	}

	@Override
	public CustEnumeratorCKT deserialize(int version, byte[] serialized) throws IOException {
		return JSON.parseObject(serialized, CustEnumeratorCKT.class);
	}

}
